package org.endy.leisure.diaTracker.repository

import org.endy.leisure.diaTracker.entity.exam.ExamAnswer
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.JpaSpecificationExecutor

interface ExamAnswerRepository : JpaRepository<ExamAnswer, Long>, JpaSpecificationExecutor<ExamAnswer> {

    fun findByExamIdAndUserId(examId: Long, userId: Long): ExamAnswer?

    fun findByUserId(userId: Long): List<ExamAnswer>?

}